package logger2.filter.gui;

import java.awt.Component;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
import javax.swing.ListCellRenderer;

import logger2.filter.Filter;

public class FilterListCellRenderer implements ListCellRenderer<Filter> {
	private final ListCellRenderer<Object> renderer = new DefaultListCellRenderer();
	
	@Override
	public Component getListCellRendererComponent(JList<? extends Filter> list,
			Filter value, int index, boolean isSelected, boolean cellHasFocus) {
		return renderer.getListCellRendererComponent(list, value.getName(), index, isSelected, cellHasFocus);
	}
}
